1. Technical Field
The present invention relates in general to document presentation, and, in particular, to caching rasterized data used in document presentation.
2. Description of the Related Art
A document is generally a data collection created by an application program, such as a word processing application, that is logically subdivided into pages. A page comprises objects, such as text, images, graphical objects, and display elements, that are to be displayed on one side of a sheet, subject to various formatting specifications, such as size, margins, font, color, depth, etc. When printed, document pages are presented on sheets, which are presentation units generally having at least two sides (e.g., a front side and a back side). Each side of a sheet may contain one or more pages.
A document is generally a piece of work created by a computer application program, such as a word processing document created by a word processing application. The work for a document typically comprises one or more sheets. A sheet is a presentational unit within the document in which each sheet has at least two sides (e.g., a front side and a back side). An exemplary sheet is a sheet of paper having a front side of the paper and a back side of the paper among various sheets of paper in a paper stack. A sheet may contain one or more pages. A page comprises objects, such as text, images, graphical objects, and display elements, that are displayed on one side of a sheet, subject to various formatting specifications, such as size, margins, font, color, depth, etc. A page may also include one or more overlays.
An overlay is a pre-defined page or part of a page that a host processor of a print server loads and sends to a local memory system of a printer. An overlay may include text, images, graphics, bar codes, and/or other objects. Overlays are stored in a memory system until they are deactivated. In contrast, if pages are stored, the pages are saved in the local memory system only until they are printed. Overlays are typically used to present fixed data on a document that does not move with respect to the sheets.
An overlay may be included in a page by specifying in the data for the page a command to include the overlay (e.g., an xe2x80x9cinclude overlayxe2x80x9d command). A rasterizer for the printer receives the data for the page and responds to the xe2x80x9cinclude overlayxe2x80x9d command by retrieving the stored overlay from the local memory system. The rasterizer processes and rasterizes the overlay, creating rasterized data specifying the usage of the overlay. An xe2x80x9coverlay instancexe2x80x9d is the data specifying a particular usage of the overlay.
The overlay instance is typically cached into a memory system for future use. However, a particular cached overlay instance can only be used again if the same overlay is placed at the same location and same side of a sheet. If the overlay is to be presented at a different location or side of a sheet, then the rasterizer must re-rasterize the overlay to create a new overlay instance, and the new overlay instance is then cached into the memory system. Thus, several overlay instances for the same overlay end up being cached into the memory system when the data stream specifies that the overlay be placed at different locations and/or on various sides of sheets. Furthermore, in a conventional parallel rasterizer which has a master processor and several satellite processors coupled to the master processor, each satellite processor has to save and maintain its own overlay instances for the same overlay.
The creation and storage of various overlay instances for the same overlay results in the inefficient use of the rasterizer and memory space. Therefore, the present invention recognizes that the conventional method of caching overlay instances for an overlay in a memory system needs to be improved. In addition, it would be desirable to reduce or eliminate redundant processing of overlay data by the rasterizer.
A system, method, and program for optimally caching in a memory system an overlay instance. The system includes a local memory and a rasterizing processor coupled to the local memory. Responsive to receipt of a presentation requirement specifying an overlay stored in a memory device, the rasterizing processor determines whether an overlay instance for the overlay is cached in a memory system. Responsive to the overlay instance not being cached in the memory system, the rasterizing processor generates a new overlay instance for the overlay and caches the new overlay instance in the memory system. Responsive to the overlay instance being cached in the memory system, the rasterizing processor produces another overlay instance tailored to the presentation requirements, compares the another overlay instance to the cached overlay instance and then caches into the memory system only one overlay instance among the another overlay instance and the cached overlay instance that best presents the overlay. The rasterizing processor discards the other overlay instance.